https://glot.io/snippets/ghpswmbhg3/raw/main.lua